package com.mk.springboot.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.SimpleDateFormat;
import java.util.Date;

// 用户表
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "users")
public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String pwd;
    private String trueName;
    private Integer sex;
    private Integer age;
    private Date birthday;

    public String getBirthday() {
        return new SimpleDateFormat("yyyy-MM-dd").format(birthday);
    }


}

